package com.fcat.common.user.service;

import com.alibaba.fastjson.JSONObject;
import com.fcat.springboot.mybatis.service.TsuantoneBaseService;
import com.fcat.common.user.entity.UserAudit;
import com.fcat.common.user.vo.SysLoginLog;
import com.fcat.common.user.vo.UserAuditVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface UserAuditService extends TsuantoneBaseService<UserAudit> {
    List<UserAudit> getUserAuditList(Map<String, Object> map);

    UserAudit getOneByUserAuditId(String userAuditId);

    Integer add(HttpServletRequest request);

    Integer createLog(HttpServletRequest request,String logType,String optObject,String optType);

    UserAudit getUserAuditByRequest(HttpServletRequest request);

    UserAudit getByUsernameAndToken(String username, String token);

    List<SysLoginLog> getSysLoginLogList(Map<String,Object> map);

    List<UserAuditVO> getLogList(Map<String,Object> map);

    List<UserAuditVO> getLast2LoginLog(String username);

    void saveLoginLog(HttpServletRequest request, JSONObject jsonObject, String username, String content);
}